Closed Bug 1868305 Opened 1 years ago Closed 10 months ago

Fix clippy warnings in intl/l10n/rust/fluent-ffi/src/text_elements.rs

Categories

(Developer Infrastructure :: Lint and Formatting, task)

Tracking

(firefox131 fixed)

RESOLVED FIXED
131 Branch
Tracking Status
firefox131 --- fixed

People

(Reporter: Sylvestre, Assigned: kavin.balag, Mentored)

References

(Blocks 1 open bug)

Details

(Keywords: good-first-bug, Whiteboard: [lang=rust])

Attachments

(1 file)

+++ This bug was initially created as a clone of Bug #1868303 +++

Filling as a good first bug to learn workflows.

intl/l10n/rust/fluent-ffi/src/text_elements.rs
  28:13  warning  redundant field names in struct initialization  clippy::redundant_field_names (clippy)
  90:38  warning  redundant closure                               clippy::redundant_closure (clippy)
  94:38  warning  redundant closure                               clippy::redundant_closure (clippy)

Links to the code:
https://searchfox.org/mozilla-central/rev/78a2c17cc80680a5a82446e4ce7c45a73b935383/intl/l10n/rust/fluent-ffi/src/text_elements.rs#28
https://searchfox.org/mozilla-central/rev/78a2c17cc80680a5a82446e4ce7c45a73b935383/intl/l10n/rust/fluent-ffi/src/text_elements.rs#90
https://searchfox.org/mozilla-central/rev/78a2c17cc80680a5a82446e4ce7c45a73b935383/intl/l10n/rust/fluent-ffi/src/text_elements.rs#94

To run clippy:

./mach lint -l clippy intl/l10n/rust/fluent-ffi/src/  -W -v -n 

As the change is trivial, it is just to learn how to contribute to Firefox.

Tutorial to contribute:
https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html
https://firefox-source-docs.mozilla.org/contributing/stack_quickref.html

Please don't ask for the bug to be assigned. It will be automatically assigned to the first patch.

Made the necessary modifications to remove the following clippy warnings

intl/l10n/rust/fluent-ffi/src/text_elements.rs
28:13 warning redundant field names in struct initialization clippy::redundant_field_names (clippy)
90:38 warning redundant closure clippy::redundant_closure (clippy)
94:38 warning redundant closure clippy::redundant_closure (clippy)

Assignee: nobody → kavin.balag
Status: NEW → ASSIGNED
Attachment #9417754 - Attachment description: Bug 1868305 - Modified certain lines in intl/l10n/rust/fluent-ffi/src/text_elements.rs to avoid clippy warnings. r=Sylvestre → Bug 1868305 - Fix some minor clippy warnings fluent-ffi r=Sylvestre
Pushed by sledru@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f4e778bc11f2 Fix some minor clippy warnings fluent-ffi r=sylvestre
Status: ASSIGNED → RESOLVED
Closed: 10 months ago
Resolution: --- → FIXED
Target Milestone: --- → 131 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: